package plus.stmt;

import plus.Gripe;

public class P_Break extends Statement {
	final String label;
	public P_Break(String label) {
		this.label = label;
	}
	
	Loop target;
	@Override
	public void threadScope() {
		Gripe.context = this;
		target = Loop.find(label);
		if (null == target) throw new plus.Gripe("no target for break statement");
	}
	@Override
	public void compile() { target.after.JMP(); }
}
